You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The coverage code would be nice to create a clipping function with, maybe using extents as input. We can get away with losing a lot of exactness since it's not required (one of the polygons is guaranteed to have axis aligned edges, after all).
A nice API would be intersection(polygon, rect) which could be called by intersection(multipolygon, rect). From there the core algorithm also generalizes to lines.
One issue is that holes will be cut the same as polygons. We should have a correction for this, which fixes polygons with holes for which one of the hole's edges is fully overlapped by one of the polygon's edges, and "dissolves"
the hole by cutting into the polygon. This will add time but create a more correct result. Winding order will have to be respected though.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.